from api.depart_api import DepartApi
from common.token_util import TokenUtil


class DepartUtil:

    #封装一个获取部门id的方法
    @classmethod
    def get_departID(cls):
        token=TokenUtil.get_token()
        add_depart_body = {"name": "测试021", "code": "341234"}
        resp = DepartApi.add_api(token, add_depart_body)
        depart_id=resp.json().get("data").get("id")
        return depart_id

if __name__ == '__main__':
    print(DepartUtil.get_departID())